package com.example.activitystudy;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import androidx.annotation.Nullable;

/**
 * service生命周期学习
 */

public class MyService extends Service {

    private static final String Tag =MyService.class.getSimpleName();

    @Override
    public void onCreate() {
        Log.e(Tag,"onCreate.....");
        super.onCreate();

    }

    @Override
    public void onStart(Intent intent, int startId) {
        Log.e(Tag,"onStart.....");
        super.onStart(intent, startId);

    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.e(Tag,"onStartCommand.....");
        return super.onStartCommand(intent, flags, startId);


    }

    @Override
    public void onDestroy() {
        Log.e(Tag,"onDestroy.....");
        super.onDestroy();
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.e(Tag,"onBind.....");
        return null;
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.e(Tag,"onUnbind.....");
        return super.onUnbind(intent);
    }
}


